<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
    <?php

    date_default_timezone_set('Asia/Jakarta');
    $this->fpdf->FPDF("L","cm","A4");
    $this->fpdf->SetMargins(1,1,1);
    $this->fpdf->AliasNbPages();
    $this->fpdf->AddPage();
    $this->fpdf->SetFont('Times','B',12);
    $path='http://localhost/sip-pzh';
    $this->fpdf->Image($path."/asseta/images/logo_lap.jpg",10,40,45,55,'JPG','');
    $this->fpdf->Cell(19,0.7,'Laporan Santri Baru',0,0,'C');
    $this->fpdf->Ln();
    $this->fpdf->Ln();
    $this->fpdf->SetFont('helvetica','',10);
    $this->fpdf->Cell(19,0.5,'Sub judul',0,0,'C');
    $this->fpdf->Ln();
    $this->fpdf->Cell(19,0.5,'subtitle',0,0,'C');
    $this->fpdf->Line(1,3.5,20,3.5);
    $this->fpdf->Line(1,3.55,21,3.55);
    $this->fpdf->Ln(1);
    $this->fpdf->SetFont('Times','B',11);
    $this->fpdf->Cell(19,1,'Data Pendaftar',0,0,'C');
    $this->fpdf->Ln(1);
    $this->fpdf->SetFont('Times','B',12);
        $this->fpdf->SetTextColor(190,30,115);
    $this->fpdf->Cell(2 , 1, 'ID' , 1, 'LR', 'L');
    $this->fpdf->Cell(5 , 1, 'Nama' , 1, 'LR', 'L');
    $this->fpdf->Cell(6 , 1, 'Lembaga' , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 1, 'Pebayaran' , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 1, 'Dokumen' , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 1, 'Tes' , 1, 'LR', 'L');
    $this->fpdf->Cell(3.5 , 1, 'Final' , 1, 'LR', 'L');
    foreach($hasil as $data)
    {
        $sekolah=$data->id_sekolah;
  $s2=$this->admin_model->getNamaSekolahById($sekolah);
    $this->fpdf->Ln();
    $this->fpdf->SetTextColor(0,0,0);
    $this->fpdf->SetFont('Times','',12);
    $this->fpdf->Cell(2 , 0.7, $data->id_santri_baru , 1, 'LR', 'L');
    $this->fpdf->Cell(5 , 0.7, $data->nama_lengkap , 1, 'LR', 'L');
    $this->fpdf->Cell(6 , 0.7, $s2['nama'] , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 0.7, $data->pembayaran , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 0.7, $data->dokumen_lengkap , 1, 'LR', 'L');
    $this->fpdf->Cell(3 , 0.7, $data->tes_lembaga , 1, 'LR', 'L');
    $this->fpdf->Cell(3.5 , 0.7, $data->status , 1, 'LR', 'L');
    }
    $this->fpdf->SetY(-3);
    $this->fpdf->SetFont('Times');
    $this->fpdf->Cell(9.5, 0.5, 'Printed on : '.date('d/m/Y H:i').' | PSB 2014',0,'LR','L');

    /* setting cell untuk page number */
    $this->fpdf->Cell(9.5, 0.5, 'Page '.$this->fpdf->PageNo().'/{nb}',0,0,'R');

    /* generate pdf jika semua konstruktor, data yang akan ditampilkan, dll sudah selesai */
    $this->fpdf->Output("laporan_seleksi_calok_atm.pdf","I");
    ?>
